<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center newfollowup_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub newfollowup_fd0_0'>
          <view class='flex flex-wrap align-center newfollowup_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  newfollowup_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='newfollowup_fd0_0_c1_c0'>新建跟进</text>
          </view>
          <view class='flex flex-wrap align-center justify-end newfollowup_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout">
        <view class='flex flex-wrap align-center justify-between newfollowup_fd1_0'
          @tap.stop="pickerDiy1719209903145=true">
          <view class='flex flex-wrap align-center newfollowup_fd1_0_c0'>
            <text class='newfollowup_fd1_0_c0_c0'>*</text>
            <text>跟进方式</text>
          </view>
          <benben-input class='newfollowup_fd1_0_c1' type="text" :placeholder="`请选择`" confirm-type="done"
            :maxlength="-1" v-model="typeName" :adjust-position='true' :disabled='true'
            placeholder-style="color:#999;font-size:28rpx" />
        </view>
        <view class='flex flex-wrap align-center justify-between newfollowup_fd1_1'>
          <view class='flex flex-wrap align-center newfollowup_fd1_0_c0'>
            <text class='newfollowup_fd1_0_c0_c0'>*</text>
            <text>跟进内容</text>
          </view>
        </view>
        <view class='flex flex-wrap newfollowup_fd1_2'>
          <benben-textarea autoHeight class='flex newfollowup_input_fd1_2' :placeholder="'请输入备注'"
            :adjust-position='true' :maxlength="-1" :show-num='true' placeholder-style="color:#999;font-size:28rpx"
            v-model="follow_content" />
          <!-- <template>
            <view class='flex flex justify-end newfollowup_numberfd1_2_c0'>
              <text>{{follow_content.length}}</text>
              <text>/</text>
              <text>240</text>
            </view>
          </template> -->
        </view>
        <view class='flex flex-wrap align-center justify-between newfollowup_fd1_1'>
          <view class='flex flex-wrap align-center newfollowup_fd1_0_c0'>
            <text>图片</text>
          </view>
        </view>
        <benben-images-upload ref="benbenImagesUploadfd1_4" :maxlength="9" :img-list.sync="follow_image"
          :img-ids.sync="follow_ids" :is-show-tips='false'>
          <template #content="{ num, maxlength, isShow, imgList }">
            <view class="flex flex-wrap align-start flex newfollowup_fd1_4">

              <view v-for="(image, index) in imgList" :key="index" class='flex position-relative newfollowup_fd1_40'>
                <text class='fu-iconfont2 position-absolute newfollowup_fd1_400'
                  @tap.stop="$refs.benbenImagesUploadfd1_4.delImage(index)">&#xE8E7;</text>
                <image class='newfollowup_fd1_401' @tap.stop="$refs.benbenImagesUploadfd1_4.previewImage(index)"
                  mode="aspectFill" :src='image'></image>
              </view>

              <image class='newfollowup_fd1_41' @tap.stop="$refs.benbenImagesUploadfd1_4.manyChooseImage()"
                v-if="isShow" mode="aspectFit" :src='STATIC_URL+"156.png"'></image>

            </view>
          </template>
        </benben-images-upload>
      </view>

      <!---flex布局flex布局结束-->
      <view class="flex benben-position-layout flex flex-wrap align-center newfollowup_flex_2" @click.stop="submit">
        <button class='newfollowup_fd2_0'>确定</button>

      </view>
      <view :style="{height: '88rpx'}"></view>
      <!--选择器开始 -->
      <benben-picker ref="benbenWritePickerCodepicker3" :visible.sync="pickerDiy1719209903145" :label.sync='typeName'
        :value.sync='typeId' :options='typeList' mode='selector' :mask-show='true' :timeout='true' :picker-height='88'
        default-type='value' :default-props='{"label":"name","value":"value"}'>
        <template #picker-header>
          <view class='flex flex-wrap align-center justify-between newfollowup_picker3_0'>
            <text @tap="$refs.benbenWritePickerCodepicker3.cancel()">取消</text>
            <text></text>
            <text class='newfollowup_picker3_0_c2' @tap="$refs.benbenWritePickerCodepicker3.pickerConfirm()">确认</text>
          </view>
        </template>
      </benben-picker>
      <!--选择器结束 -->


    </view>
  </page-body>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "pickerDiy1719209903145": false,
        "typeList": [{
          value: '1',
          name: '微信'
        }, {
          value: '2',
          name: '电话'
        }, {
          value: '3',
          name: '短信'
        }],
        "typeId": "1",
        "typeName": "微信",
        aid: '',
        follow_content: '',
        follow_image: [],
        follow_ids: ""
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      let {
        aid
      } = options
      if (aid !== undefined) this.aid = aid
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      submit() {
        let imgs = ''
        if (!this.follow_content) {
          this.$message.info('请输入更进内容')
          return
        }
        if (this.follow_image.length) {
          imgs = this.follow_image.join(',')
        }
        this.$api.dbPost(global.apiUrls.post666d5d4fcdcdf, {
          follow_method: this.typeId,
          follow_content: this.follow_content,
          follow_image: imgs,
          customerinfo_id: this.aid
        }).then(res => {
          if (res.data.code == 1) {
            uni.navigateBack()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: var(--benbenbgColor1);
    background-size: 100% auto;
  }

  .newfollowup_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .newfollowup_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .newfollowup_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .newfollowup_fd0_0_c0 {
    width: 120rpx;
  }

  .newfollowup_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .newfollowup_fd1_41 {
    width: 160rpx;
    height: 160rpx;
    margin: 0rpx 24rpx 24rpx 0rpx;
  }

  .newfollowup_fd1_401 {
    width: 160rpx;
    height: 160rpx;
  }

  .newfollowup_fd1_400 {
    top: 0rpx;
    right: 0rpx;
    z-index: 10;
    color: #ff5536;
  }

  .newfollowup_fd1_40 {
    margin: 0rpx 24rpx 24rpx 0rpx;
  }

  .newfollowup_fd1_4 {
    width: 686rpx;
    // padding: 24rpx 0rpx 0rpx 24rpx;
    margin: 0rpx auto 0rpx auto;
  }

  .newfollowup_numberfd1_2_c0 {
    width: 100%;
    font-size: 24rpx;
    color: var(--benbenFontColor0);
    line-height: 46rpx;
    font-weight: 400;
  }

  .newfollowup_input_fd1_2 {
    width: 100%;
    min-height: 140rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #333;
    white-space: pre-wrap;
  }

  .newfollowup_fd1_2 {
    background: #F8F8F8;
    border-radius: 8rpx;
    padding: 16rpx;
    margin: 0rpx auto 0rpx auto;
    width: 686rpx;
  }

  .newfollowup_fd1_1 {
    width: 702rpx;
    line-height: 100rpx;
    height: 100rpx;
    margin: 0rpx auto 0rpx auto;
  }

  .newfollowup_fd1_0_c1 {
    text-align: right;
  }

  .newfollowup_fd1_0_c0_c0 {
    color: var(--benbenFontColor5);
  }

  .newfollowup_fd1_0_c0 {
    height: 100rpx;
    line-height: 100rpx;
  }

  .newfollowup_fd1_0 {
    border-bottom: 1px solid #eee;
    width: 702rpx;
    line-height: 100rpx;
    height: 100rpx;
    margin: 0rpx auto 0rpx auto;
  }

  .newfollowup_flex_2 {
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    left: 32rpx;
    bottom: calc(80rpx + var(--window-bottom));
  }

  .newfollowup_fd2_0 {
    background: #F9E4C3;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    width: 686rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor0);
    height: 88rpx;
  }

  .newfollowup_picker3_0_c2 {
    color: rgba(211, 152, 80, 1);
  }

  .newfollowup_picker3_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
    border-radius: 25rpx 25rpx 0rpx 0rpx;
    background-size: 100% auto !important;
  }
</style>
